﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Configuration;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using 简单三层架构.Model;

namespace 简单三层架构.BLL
{
    public class Cart
    {
        private IList<LineItemInfo> lineItems;

        public Cart()
        {
            lineItems = new List<LineItemInfo>();
        }

        public void Add(LineItemInfo lineItem)
        {
            lineItems.Add(lineItem);
        }

        public void Remove(LineItemInfo lineItem)
        {
            lineItems.Remove(lineItem);
        }

        public void Clear()
        {
            lineItems.Clear();
        }

        public IList<LineItemInfo> GetLineItems()
        {
            return lineItems;
        }
    }
}